Ranking function

In information retrieval, a ranking function is a function used by search engines to rank matching documents according to their relevance to a given search query.

Once a search engine has identified a set of potentially relevant documents, it faces the task of determining which articles are most relevant, so that they may be listed first. This is typically done by assigning a numerical score to each document based on a ranking function, which incorporates features of the document, the query, and the overall document collection.

Some very simple ranking functions include:

More sophisticated ranking functions include:

Ranking functions are evaluated by a variety of means; one of the simplest is determining the precision of the first k top-ranked results for some fixed k; for example, the proportion of the top 10 results that are relevant, on average over many queries.

Frequently, computation of ranking functions can be simplified by taking advantage of the observation that only the relative order of scores matters, not their absolute value; hence terms or factors that are independent of the document may be removed, and terms or factors that are independent of the query may be precomputed and stored with the document.